(()=>{var e={52381:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var i=n(20029);var o=n(2073);function a(e,t={}){const n="/api/v3/ajax/member/transcend/user-consent-preferences";const a={consent_payload:e};if(t){t.hasOwnProperty("is_confirmed")&&(a["is_confirmed"]=t["is_confirmed"]);t.hasOwnProperty("expiration_period_minutes")&&(a["expiration_period_minutes"]=t["expiration_period_minutes"]);t.hasOwnProperty("applicable_purposes")&&(a["applicable_purposes"]=t["applicable_purposes"]);t.hasOwnProperty("regional_experiences")&&(a["regional_experiences"]=t["regional_experiences"])}return{headers:{"x-csrf-token":(0,i["default"])(),"x-detected-locale":(0,o["default"])()},data:a,url:n,type:"POST"}}},6268:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var i=n(20029);var o=n(2073);function a(e,t={}){const n="/api/v3/ajax/public/transcend/anonymous-consent-preferences";const a={consent_payload:e};if(t){t.hasOwnProperty("is_confirmed")&&(a["is_confirmed"]=t["is_confirmed"]);t.hasOwnProperty("expiration_period_minutes")&&(a["expiration_period_minutes"]=t["expiration_period_minutes"]);t.hasOwnProperty("applicable_purposes")&&(a["applicable_purposes"]=t["applicable_purposes"]);t.hasOwnProperty("regional_experiences")&&(a["regional_experiences"]=t["regional_experiences"])}return{headers:{"x-csrf-token":(0,i["default"])(),"x-detected-locale":(0,o["default"])()},data:a,url:n,type:"POST"}}},6255:(e,t,n)=>{"use strict";n.d(t,{updatePrivacySettingsFooterTextBasedOnRegime:()=>H});var i=n(53423);var o=n.n(i);var a=n(20029);var s=n(2073);function r(e={}){const t="/api/v3/ajax/bespoke/member/user-preferences/gdpr";const n={};if(e){e.hasOwnProperty("third_party_consent")&&(n["third_party_consent"]=e["third_party_consent"]);e.hasOwnProperty("personalization_consent")&&(n["personalization_consent"]=e["personalization_consent"])}return{headers:{"x-csrf-token":(0,a["default"])(),"x-detected-locale":(0,s["default"])()},data:n,url:t,type:"POST"}}var l=n(52381);var d=n(6268);var c=n(36529);var u=n(6831);var h=n(99921);const p="gdprSettingsPromptClosed";const g="data-gdpr-consent-prompt-open-automatically";const m="[data-gdpr-consent-prompt]";function v(){const e=document.querySelector(m);return"true"===(null===e||void 0===e?void 0:e.getAttribute(g))}function f(e){document.addEventListener(p,(()=>{e.openOverlay()}))}function _(e){this.manager=e;this.overlayContainer=e.el.find("[data-gdpr-settings-overlay]");this.isThirdPartyConsent=this.overlayContainer.hasClass("third-party-settings");this.openModalEventName=this.isThirdPartyConsent?"third_party_settings_shown":"full_settings_shown";this.overlay=new h["default"](this.overlayContainer[0],{closeOnEsc:false,closeOnMaskClick:false});this.footerSettingsTrigger=o()("[data-gdpr-privacy-settings-trigger]");this.requests={};this.savedTimeout=null;this.setUpHandlers()}_.HEADER_SELECTOR="h2";_.SAVED_INDICATOR_DURATION=5e3;_.SUCCESS_ALERT_DURATION=5e3;_.prototype={setUpHandlers(){this.overlayContainer[0].addEventListener("wtOverlayOpen",this.onOpen.bind(this));this.overlayContainer.on("click","a",(e=>this.manager.handleLinkClick("full_settings",e)));this.footerSettingsTrigger.on("click",this.open.bind(this))},switchToFullSettings(){this.manager.logEvent("change_settings_clicked");this.manager.closeSingleChoiceSettings().then((()=>{this.open()}))},open(){this.manager.logEvent(this.openModalEventName);this.overlay.open();u["default"].increment(`gdpr.consent.ui.prompt.${this.openModalEventName}`);return false},close(){const e=this.overlayContainer.find("[data-gdpr-toggle]");const t={};let n=false;e.each((function(){if(!o()(this).data("modified")){n=true;t[o()(this).attr("name")]=o()(this).is(":checked")}}));n&&this.manager.persistSettings(t).then(this.manager.displaySaveConfirmation);const i=new Event(p);document.dispatchEvent(i);this.overlay.close()},onOpen(){this.overlayContainer.parent(".overlay-content-wrapper").addClass("gdpr-overlay-content-wrapper");this.overlayContainer.find("button[data-wt-overlay-close]").on("click",this.close.bind(this));o()("[data-gdpr-toggle]").on("change",this.updateSetting.bind(this));this.adjustLabels()},toggleGDPRSwitchesOff(){const e=this.overlayContainer.find("[data-gdpr-toggle]");const t=this.overlayContainer;e.each((function(){this.checked=false;const e=t.find(`[for = "${this.id}"].wt-text-caption`)[0];e&&(e.textContent=this.getAttribute(`data-unchecked-label`))}))},toggleGDPRSwitchesOn(e=true){const t=this.overlayContainer.find("[data-gdpr-toggle]");const n=this.overlayContainer;t.each((function(){if(e||"third_party_consent"!==this.id){this.checked=true;const e=n.find(`[for = "${this.id}"].wt-text-caption`)[0];e&&(e.textContent=this.getAttribute(`data-checked-label`))}}))},updateSetting(e){const t=o()(e.target);const n=t.attr("id");const i=o()(e.target).closest("[data-section]").find("[data-gdpr-toggle-label]");let a;a=t.is(":checked")?t.data("checked-label"):t.data("unchecked-label");i.html(a);t.attr("disabled",true);t.data("modified",true);const s={};s[n]=t.is(":checked");const r=this.manager.persistSettings(s);r.always((()=>{t.attr("disabled",false);t.trigger("focus")}));this.handleSaving(n,r)},handleSaving(e,t){t.always((()=>{this.handleSaved(e,t)}));this.requests[e]=t;o()("[data-saving-indicator]").removeClass("wt-display-none");o()("[data-saved-indicator]").addClass("wt-display-none");this.savedTimeout&&window.clearTimeout(this.savedTimeout)},handleSaved(e,t){this.requests[e]=null;let n=true;for(const i in this.requests)if(Object.prototype.hasOwnProperty.call(this.requests,i)&&this.requests[i]){n=false;return}if(n){const e=o()("[data-saving-indicator]",this.overlayContainer);const t=o()("[data-saved-indicator]",this.overlayContainer);e.addClass("wt-display-none");t.removeClass("wt-display-none");this.savedTimeout=window.setTimeout((()=>{t.hide();this.savedTimeout=null}),_.SAVED_INDICATOR_DURATION)}},adjustLabels(){o()("[data-section]",this.overlayContainer).each((function(){const e=o()(this).data("section");const t=`settings-title-${e}`;o()(this).find(_.HEADER_SELECTOR).attr("id",t);o()(this).find("[data-gdpr-toggle]").attr("aria-labelledby",t)}))}};const y=_;var S=n(22790);function E(e){this.manager=e;this.overlayContainer=e.el.find("[data-gdpr-single-choice-overlay]");this.overlayReduxContainer=e.el.find("[data-gdpr-single-choice-overlay-redux]");this.overlayReduxWtOverlay=null;this.footerSettingsTrigger=o()("[data-gdpr-privacy-settings-trigger]");this.requests={};this.savedTimeout=null;this.setUpHandlers()}E.HEADER_SELECTOR="h2";E.SAVED_INDICATOR_DURATION=5e3;E.SUCCESS_ALERT_DURATION=5e3;E.prototype={setUpHandlers(){const e=this.overlayContainer.add(this.overlayReduxContainer);e.find("[data-gdpr-single-choice-accept]").on("click",this.acceptAll.bind(this));e.find("[data-gdpr-open-full-settings]").on("click",this.switchToFullSettings.bind(this));e.on("click","[data-gdpr-single-choice-reject]",this.essentialOnly.bind(this));e.on("click","a",(e=>this.manager.handleLinkClick("single_choice",e)))},switchToFullSettings(){this.manager.logEvent("change_settings_clicked");return this.close().then(this.manager.openFullSettings)},open(){if(0!==this.overlayContainer.length){this.overlayContainer.show();S["default"].containFocusInElement(this.overlayContainer);S["default"].setFocusToFirstFocusableElement(this.overlayContainer)}else{if(0===this.overlayReduxContainer.length){this.manager.logEvent("single_choice_container_missing");u["default"].increment("gdpr.consent.ui.prompt.single_choice_container_missing");return}this.overlayReduxWtOverlay=new h["default"](this.overlayReduxContainer[0],{closeOnEsc:false,closeOnMaskClick:false});this.overlayReduxWtOverlay.open()}this.manager.logEvent("single_choice_shown");u["default"].increment("gdpr.consent.ui.prompt.single_choice_shown")},close(){S["default"].removeContainFocus();this.overlayContainer.hide();return this.overlayReduxWtOverlay?this.overlayReduxWtOverlay.close():Promise.resolve()},essentialOnly(e){this.manager.handleEssentialOnly();const t=this.manager.persistSettings({personalization_consent:false,third_party_consent:false}).then(this.manager.displaySaveConfirmation);const n=new Event(p);document.dispatchEvent(n);this.close();return t},acceptAll(e){this.manager.handleAcceptAll();let t;t=this.manager.shouldUpdateThirdPartyConsent()?this.manager.persistSettings({personalization_consent:true,third_party_consent:true}).then(this.manager.displaySaveConfirmation):this.manager.persistSettings({personalization_consent:true}).then(this.manager.displaySaveConfirmation);const n=new Event(p);document.dispatchEvent(n);this.close();return t}};const T=E;var w=n(55110);var O=n(17119);var C=n(66848);const b=function(){let e=null;function t(e){!e&&w["default"].getBoolean("dynamic_privacy_settings_ui_enabled")||this.intializeModal(e)}t.getInstance=function(n){e||(e=new t(n));return e};t.resetInstance=function(){e=null};return t}();b.prototype={getTranscendPurposes(e=true){return window.airgap&&window.airgap.getRegimePurposes&&e?Array.from(window.airgap.getRegimePurposes()):w["default"].getArray("all_purposes")},getTranscendRegimes(){return window.airgap&&window.airgap.getRegimes?Array.from(window.airgap.getRegimes()):w["default"].getArray("all_regimes")},getTranscendConsentExpiry(){return window.airgap&&window.airgap.loadOptions&&window.airgap.loadOptions.consentExpiry?window.airgap.loadOptions.consentExpiry:w["default"].getNumber("default_consent_expiry")},checkForOpenAutomatically(){this.singleChoiceSettings&&this.el.data("gdpr-consent-prompt-open-automatically")&&this.singleChoiceSettings.open()},openFullSettings(){this.fullSettings.open()},closeSingleChoiceSettings(){return this.singleChoiceSettings.close()},persistSettings(e){true===e.third_party_consent&&w["default"].getBoolean("google_tag_manager_async_enabled")&&C["default"].fetchOne("google_tag_manager","Etsy\\Modules\\GoogleTagManager\\ApiSpec",{},"POST",[]).then((e=>{const t=document.createRange().createContextualFragment(e.output.google_tag_manager);document.getElementById("google-tag-manager-container").appendChild(t)}));return w["default"].getBoolean("dynamic_privacy_settings_ui_enabled")?this.setTranscendPreferences(e):w["default"].getBoolean("dual_write_enabled")?o().when(o().ajax(r(e)),this.setTranscendPreferences(e)):o().ajax(r(e))},setTranscendPreferences(e){const t={};Object.hasOwn(e,"personalization_consent")&&(t.Functional=e.personalization_consent?"true":"false");Object.hasOwn(e,"third_party_consent")&&(t.Advertising=e.third_party_consent?"true":"false");const n={timestamp:(new Date).toISOString(),purposes:t};const i={is_confirmed:true,expiration_period_minutes:this.getTranscendConsentExpiry(),applicable_purposes:this.getTranscendPurposes(),regional_experiences:this.getTranscendRegimes()};const a=O["default"].getSignedInUserId();return a?o().ajax((0,l["default"])(n,i)):o().ajax((0,d["default"])(n,i))},handleEssentialOnly(){this.logEvent("essential_only");this.fullSettings.toggleGDPRSwitchesOff()},shouldUpdateThirdPartyConsent(){return!this.getTranscendRegimes().some((e=>w["default"].getArray("disable_advertising_regimes",[]).includes(e)))},handleAcceptAll(){this.logEvent("accept_all");this.fullSettings.toggleGDPRSwitchesOn(this.shouldUpdateThirdPartyConsent())},displaySaveConfirmation(){const e=o()(this.consentSuccessAlert);o()("body").append(e);setTimeout((()=>{e.remove()}),y.SUCCESS_ALERT_DURATION)},handleLinkClick(e,t){t.preventDefault();const n=o()(t.target).attr("href");this.logEvent("link_clicked",{overlay_source:e,link_url:n});const i=window.open(`${n}?ref=pv_ol`,"_blank");i||(window.location.href=`${n}?ref=pv_ol`)},logEvent(e,t={}){const n=t||{};n["event_name"]=`gdpr_consent_prompt_${e}`;c["default"].logEvent(n)},initializeModalFromAPISpec(e=true){const t=o()("[data-gdpr-consent-prompt]");if(!w["default"].getBoolean("dynamic_privacy_settings_ui_enabled")){c["default"].logEvent({event_name:"dynamic_privacy_ui_api_spec_called_without_flag"});return}C["default"].fetchOne("transcend_consent_modal","GDPR_ApiSpecs_ConsentPrompt",{purposes:this.getTranscendPurposes(e),regimes:this.getTranscendRegimes(),expiration_period_minutes:this.getTranscendConsentExpiry()},"POST",[]).then((e=>{if(0===t.length)c["default"].logEvent({event_name:"dynamic_privacy_ui_element_missing_gdpr-privacy-settings"});else{t.replaceWith(e.output.transcend_consent_modal);this.intializeModal();P("privacy-settings-manager-initialized");this.checkForOpenAutomatically()}})).fail((()=>{c["default"].logEvent({event_name:"dynamic_privacy_settings_ui_apispec_failed"})}))},intializeModal(e){const t=e||o()("[data-gdpr-consent-prompt]");this.el=o()(t);if(0===this.el){c["default"].logEvent({event_name:"privacy_settings_empty_inputEl"});return}const n=this.el.find("[data-gdpr-settings-overlay]");if(0===n.length){c["default"].logEvent({event_name:"privacy_settings_empty_fullSettingsOverlayContainer"});return}this.consentSuccessAlert=this.el.find("[data-gdpr-consent-success-alert]").text();this.openFullSettings=this.openFullSettings.bind(this);this.displaySaveConfirmation=this.displaySaveConfirmation.bind(this);this.fullSettings=new y(this);this.singleChoiceSettings=new T(this)}};const A=b;function I(e=true,t=true){if(!w["default"].getBoolean("dynamic_privacy_settings_ui_enabled"))return;const n=b.getInstance(null);n.initializeModalFromAPISpec(t);e||u["default"].increment("privacy.transcend.privacy_settings_manager_loaded_after_airgap_failure",1);t||u["default"].increment("privacy.transcend.privacy_settings_manager_loaded_after_set_consent_failure",1)}window.initializePrivacySettingsManager=I;P("privacy-settings-manager-load-complete");function P(e){if(document){const t=document.createElement("div");t.setAttribute("id",e);t.style.display="none";document.body&&document.body.appendChild(t)}}function N(){const e=A.getInstance();e.checkForOpenAutomatically()}const x=N;var L=n(88057);var k=n(53579);var R=n(62879);var M=n(61894);const F="500px";const D=()=>{(0,L.onDOMReady)((()=>{const e=()=>{n.e(3875).then(n.bind(n,44443))};const t=()=>{c["default"].logEvent({event_name:"footer_seen"})};const i=document.querySelector("#collage-footer");if(i){(0,k["default"])(i,e,{rootMargin:F});(0,k["default"])(i,t)}}))};x();D();const B=document.getElementById("collage-footer__community-teams-link");const j=document.getElementById("collage-footer__community-forums-link");const U=document.getElementById("collage-footer__registry-link");const $=function(){c["default"].logEvent({event_name:"community_teams"})};const q=function(){c["default"].logEvent({event_name:"community_forums"})};const G=function(){c["default"].logEvent({event_name:"registry_ingress_footer_clicked"})};const W=function(){c["default"].logEvent({event_name:"registry_ingress_footer_seen"})};if(null!==B&&null!==j){B.addEventListener("click",(0,R["default"])($,250));j.addEventListener("click",(0,R["default"])(q,250))}if(null!==U){(0,k["default"])(U,W);U.addEventListener("click",(0,R["default"])(G,250))}const z=document.querySelector("#collage-footer [data-footer-app-link]");z&&z.addEventListener("click",(()=>{c["default"].logEventImmediately({event_name:"footer_app_link_click"})}));function H(){var e;const t="do-not-sell-or-share";if(!w["default"].getBoolean("dynamic_privacy_settings_ui_enabled"))return;const n=null!==(e=window.airgap)&&void 0!==e&&e.getRegimes?Array.from(window.airgap.getRegimes()):[t];let i=null;if(n.includes(t))u["default"].increment("privacy.dynamic_ui.privacy_footer.text_not_updated");else{i=(0,M.msg)({content:"Privacy settings"});u["default"].increment("privacy.dynamic_ui.privacy_footer.text_updated")}if(i){const e=document.querySelector("[data-gdpr-privacy-settings-trigger] span");e?e.textContent=i:u["default"].increment("privacy.dynamic_ui.privacy_footer.text_missing")}}window.updatePrivacySettingsFooterTextBasedOnRegime=H;if(document){const e=document.createElement("div");e.setAttribute("id","footer-script-loaded");e.style.display="none";document.body&&document.body.appendChild(e)}},70101:()=>{"use strict";const e="[\\w$-]+";const t=new RegExp(`\\{\\{(${e})\\}\\}`);const n=new RegExp(`\\{\\{#(${e})\\}\\}`);function i(e){const n=t.exec(e);if(n){const[t,o]=n;if(void 0===t||void 0===o){false;return[e]}const r=n.index;if(a(e,n)){const n=e.slice(0,r-1);const o=e.slice(r+t.length,e.length);return s([n,t,...i(o)])}const l=e.slice(0,r);const d=e.slice(r+t.length,e.length);return s([l,{type:"variable",variable:o},...i(d)])}return[e]}function o(e){const t=n.exec(e);if(t){const[n,r]=t;if(void 0===n||void 0===r){false;return i(e)}const l=t.index;if(a(e,t)){const t=e.slice(0,l-1);const a=e.slice(l+n.length,e.length);return s([...i(t),n,...o(a)])}const d=e.slice(0,l);const c=`{{/${r}}}`;const u=e.indexOf(c);if(-1===u){false;const t=e.slice(l+n.length,e.length);return s([...i(d),...o(t)])}const h=e.slice(l+n.length,u);const p=e.slice(u+c.length,e.length);return s([...i(d),{type:"block",variable:r,children:o(h)},...o(p)])}return i(e)}function a(e,t){if(0===t.index)return false;return"\\"===e[t.index-1]}function s(e){return e.filter((e=>{if("string"===typeof e)return e.length>0;return true}))}function r(e){if(void 0===e)return;return{type:"tree",version:1,children:o(e)}}var l=null&&r},29152:(e,t,n)=>{"use strict";var i=n(23736);var o=n(99427);var a=n(67507);const s={visitTree:(e,t)=>(0,a.jsx)(a.Fragment,{children:e}),visitBlock:(e,t,n)=>(0,a.jsx)(i["default"],{tagKey:e,args:n.args,children:t},n.nextKey()),visitVariable:(e,t)=>(0,a.jsx)(o["default"],{tagKey:e,args:t.args},t.nextKey())};function r(e,t){let n=1;return transform(e,s,{args:t,nextKey:()=>(n++).toString()})}},71066:(e,t,n)=>{"use strict";const i={visitTree:(e,t)=>e.join(""),visitBlock:(e,t,n)=>n[e]?t.join(""):"",visitVariable:(e,t)=>{const n=t[e];const i=n||0===n;return i?n.toString():""}};function o(e,t){return transform(e,i,t)}},61894:(e,t,n)=>{"use strict";n.d(t,{msg:()=>r});var i=n(14935);var o=n(70101);var a=n(29152);var s=n(71066);function r({content:e}){return e}function l({content:e}){let t;const n=()=>{void 0===t&&(t=parse(e));return t};const i=t=>void 0===t?e:renderToString(n(),t);i.toComponent=()=>function e({args:t}){return renderToPreact(n(),null!==t&&void 0!==t?t:{})};return i}function d(e){const t=e;const n=new Map;const i=e=>{let t=n.get(e);if(void 0===t){t=parse(e);n.set(e,t)}return t};const o=(e,n)=>{const o=c(t,e);return void 0===n?o:renderToString(i(o),n)};o.toComponent=()=>{const e=({pluralCount:e,args:n})=>{const o=c(t,e);return renderToPreact(i(o),null!==n&&void 0!==n?n:{})};e.displayName="Msg";return e};return o}function c(e,t){if(u(e))return 1===t?e.content.one:e.content.many;const[n,i]=e.content;return etsyMsg.pickPluralCase(n,i,t)}function u(e){return Object.prototype.hasOwnProperty.call(e.content,"one")&&Object.prototype.hasOwnProperty.call(e.content,"many")}},23736:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});function i({tagKey:e,args:t,children:n}){if(void 0===n)return null;const i=t[e];if("function"!==typeof i){false;return null}return i(n)}const o=i},99427:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var i=n(67507);function o({tagKey:e,args:t}){const n=t[e];if(void 0===n)return null;return(0,i.jsx)(i.Fragment,{children:n})}const a=o},40477:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var i=n(14339);var o=n(42695);const a="wt-html-no-scroll";const s="wt-body-no-scroll";const r=[];const l=function(){this.original_padding_right=0;this.original_scroll_top=0;this.container=null;this.uuid=(0,o["default"])();this.enableScrollingImmediately=false};l.prototype.isScrollingDisabled=function(){return r.indexOf(this.uuid)>=0&&document.body.classList.contains(s)};l.prototype.disableScrolling=function(){if(!this.isScrollingDisabled()){r.push(this.uuid);const e=void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;const t=i["default"].scrollBarWidth();this.original_padding_right=parseInt(document.body.style.paddingRight||0);this.original_scroll_top=e;document.body.classList.add(s);document.documentElement.classList.add(a);document.body.style.paddingRight=`${this.original_padding_right+t}px`;document.body.style.top=`${-1*e}px`}};l.prototype.enableScrolling=function(){if(this.isScrollingDisabled()){r.pop(this.uuid);const e=()=>{document.body.style.paddingRight=this.original_padding_right;document.body.style.top="auto";document.body.classList.remove(s);document.documentElement.classList.remove(a);document.body.scrollTop=this.original_scroll_top;document.documentElement.scrollTop=this.original_scroll_top};this.enableScrollingImmediately?e():setTimeout(e,5)}};l.prototype.containScrolling=function(e){this.disableScrolling();this.container=e;this.container.style["overscroll-behavior"]="contain"};l.prototype.releaseScrolling=function(){this.enableScrolling();this.container&&this.container.style.removeProperty("overscroll-behavior")};const d=l},14339:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});function i(){this._scrollBarWidth=null}i.prototype={scrollBarWidth(e){null===this._scrollBarWidth&&(this._scrollBarWidth=a());return o()||e?this._scrollBarWidth:0}};function o(){return document.body.scrollHeight>window.innerHeight}function a(){const e=document.createElement("div");e.style.visibility="hidden";e.style.width="100px";e.style.msOverflowStyle="scrollbar";document.body.appendChild(e);const t=e.offsetWidth;e.style.overflow="scroll";const n=document.createElement("div");n.style.width="100%";e.appendChild(n);const i=n.offsetWidth;e.parentNode.removeChild(e);return t-i}const s=new i},99921:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var i=n(97418);var o=n(91289);var a=n(51949);var s=n(5015);var r=n(95989);var l=n(32648);function d(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}class c extends i["default"]{constructor(e,t){var n,i,l,c,u,h;super();d(this,"state",void 0);d(this,"element",void 0);d(this,"elements",void 0);d(this,"options",void 0);d(this,"id",void 0);d(this,"ariaRole",void 0);d(this,"SELECTORS",void 0);d(this,"triggers",void 0);d(this,"closeButtons",void 0);d(this,"overlayCore",void 0);d(this,"_setupAnimateIn",(()=>{if(this.options.animateIn){var e;null===(e=this.elements.root)||void 0===e?void 0:e.classList.remove(a["default"].CLASSES.NO_ANIMATION)}else{var t;null===(t=this.elements.root)||void 0===t?void 0:t.classList.add(a["default"].CLASSES.NO_ANIMATION)}}));d(this,"_setupAnimateOut",(()=>{if(this.options.animateOut){var e;null===(e=this.elements.root)||void 0===e?void 0:e.classList.remove(a["default"].CLASSES.NO_ANIMATION)}else{var t;null===(t=this.elements.root)||void 0===t?void 0:t.classList.add(a["default"].CLASSES.NO_ANIMATION)}}));d(this,"_setupTriggers",(()=>{this.triggers=document.querySelectorAll(`button[aria-controls="${this.id}"]`);Array.prototype.map.call(this.triggers,(e=>{this.overlayCore&&e.addEventListener("click",this.overlayCore.open.bind(this.overlayCore))}),this)}));d(this,"_setupCloseButtons",(()=>{var e;this.closeButtons=(null===(e=this.element)||void 0===e?void 0:e.querySelectorAll(this.SELECTORS.CLOSE_BUTTON))||null;this.closeButtons&&Array.prototype.map.call(this.closeButtons,(e=>{this.overlayCore&&e.addEventListener("click",this.overlayCore.cancel.bind(this.overlayCore))}),this)}));d(this,"_moveIntoContainer",(()=>{var e;this.element&&(null===(e=this.elements.globalModalContainer)||void 0===e?void 0:e.appendChild(this.element))}));d(this,"handleStateChange",(e=>{switch(e){case a["default"].OPEN_STATES.IS_OPENING:this._handleOpening();break;case a["default"].OPEN_STATES.IS_OPEN:this._handleOpen();break;case a["default"].OPEN_STATES.IS_CANCELED:this._handleCancelled();break;case a["default"].OPEN_STATES.IS_CLOSING:this._handleClosing();break;case a["default"].OPEN_STATES.IS_CLOSED:this._handleClosed();break;default:break}}));d(this,"_handleOpening",(()=>{var e,t,n;null===(e=this.elements.root)||void 0===e?void 0:e.dispatchEvent(new CustomEvent(a["default"].EVENTS.BEFORE_OPEN));null===(t=this.elements.root)||void 0===t?void 0:t.setAttribute("aria-hidden","false");null===(n=this.elements.root)||void 0===n?void 0:n.setAttribute("aria-modal","true")}));d(this,"_handleOpen",(()=>{var e,t;null===(e=this.elements.modal)||void 0===e?void 0:e.classList.add(a["default"].CLASSES.ANIMATION_DONE);null===(t=this.elements.root)||void 0===t?void 0:t.dispatchEvent(new CustomEvent(a["default"].EVENTS.OPEN));this._setupAnimateOut()}));d(this,"_handleCancelled",(()=>{var e;null===(e=this.elements.root)||void 0===e?void 0:e.dispatchEvent(new CustomEvent(a["default"].EVENTS.CANCEL));this.close()}));d(this,"_handleClosing",(()=>{var e,t,n,i;null===(e=this.elements.root)||void 0===e?void 0:e.dispatchEvent(new CustomEvent(a["default"].EVENTS.BEFORE_CLOSE));null===(t=this.elements.modal)||void 0===t?void 0:t.classList.remove(a["default"].CLASSES.ANIMATION_DONE);null===(n=this.elements.root)||void 0===n?void 0:n.setAttribute("aria-modal","false");null===(i=this.elements.root)||void 0===i?void 0:i.setAttribute("aria-hidden","true")}));d(this,"_handleClosed",(()=>{var e;null===(e=this.elements.root)||void 0===e?void 0:e.dispatchEvent(new CustomEvent(a["default"].EVENTS.CLOSE));this._setupAnimateIn()}));d(this,"open",(()=>{var e;return null===(e=this.overlayCore)||void 0===e?void 0:e.open()}));d(this,"close",(()=>{var e;return null===(e=this.overlayCore)||void 0===e?void 0:e.close()}));d(this,"cancel",(()=>{var e;return null===(e=this.overlayCore)||void 0===e?void 0:e.cancel()}));this.state=a["default"].INITIAL_STATE;this.element=e;this.id=(null===(n=this.element)||void 0===n?void 0:n.getAttribute("id"))||void 0;this.elements={};this.overlayCore=null;this.ariaRole=(null===(i=this.element)||void 0===i?void 0:i.getAttribute("role"))||null;this.triggers=null;this.closeButtons=null;this.SELECTORS={MODAL_ELEMENT:"[data-overlay-modal]",CLOSE_BUTTON:"[data-wt-overlay-close]"};const p=(null===(l=this.element)||void 0===l?void 0:l.querySelector(this.SELECTORS.MODAL_ELEMENT))||null;const g=this.element?(0,r["default"])(this.element):{};this.options=Object.assign({},a["default"].DEFAULT_OPTIONS,t,{ariaRole:this.ariaRole},g);if(null!==(c=this.options)&&void 0!==c&&c.modalContainerId&&null!==(u=this.options)&&void 0!==u&&u.pageContentSelector){this.elements={root:this.element,modal:p,globalModalContainer:o["default"].getGlobalModalContainer(this.options.modalContainerId),globalPageContent:document.querySelectorAll(this.options.pageContentSelector)};this.overlayCore=new o["default"](this.id,this.options,this.elements);this.overlayCore.initialize();this.overlayCore.addListener((e=>{this.handleStateChange(e.openState)}))}if(!(0,s["default"])(e,"WtOverlay - The element provided to the constructor does not exist"))return;if(!(0,s["default"])(p,"WtOverlay - The [data-overlay-modal] child does not exist"))return;this._setupAnimateIn();this._moveIntoContainer();null!==(h=this.options)&&void 0!==h&&h.customTrigger||this._setupTriggers();this._setupCloseButtons()}}const u=c},51949:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});const i={ariaRole:"dialog",closeOnEsc:true,closeOnMaskClick:true,animateIn:true,animateOut:true,animationStyle:"fade",pageContentSelector:"#content, #gnav-header, #cnav-header, #gnav-footer, #desktop-category-nav, #collage-footer",modalContainerId:"wt-modal-container",customTrigger:false};const o={root:null,modal:null,globalModalContainer:null,globalPageContent:null};const a={default:"",large:"wt-overlay--large",info:"wt-overlay--info",alert:"wt-overlay--alert",peek:"wt-overlay--peek",peekRight:"wt-overlay--peek wt-overlay--peek-right",peekLeft:"wt-overlay--peek wt-overlay--peek-left",full:"wt-overlay--full-screen",video:"wt-overlay--video"};const s={IS_CLOSED:"isClosed",IS_OPENING:"isOpening",IS_OPEN:"isOpen",IS_CLOSING:"isClosing",IS_CANCELED:"isCanceled"};const r={openState:s.IS_CLOSED};const l={BEFORE_OPEN:"wtOverlayBeforeOpen",OPEN:"wtOverlayOpen",BEFORE_CLOSE:"wtOverlayBeforeClose",CLOSE:"wtOverlayClose",CANCEL:"wtOverlayCancel"};const d={WILL_ANIMATE:"wt-overlay--will-animate",ANIMATION_DONE:"wt-overlay--animation-done",ANIMATION_STYLE_GROW:"wt-overlay--animation-style-grow",NO_ANIMATION:"wt-overlay--no-animation",HAS_CLOSE_ICON:"wt-overlay--has-close-icon",DISPLAY_NONE:"wt-display-none"};const c={primary:"primary",secondary:"secondary",cancel:"cancel"};const u={filled:"filled",outline:"outline",transparent:"transparent",tertiary:"tertiary"};const h={OPEN_ANIMATION_TIMEOUT:300,CLOSE_ANIMATION_TIMEOUT:300,GROW_ANIMATION_TIMEOUT:350};const p={INITIAL_FOCUS_ELEMENT:"[data-overlay-initial-focus]"};const g={DEFAULT_OPTIONS:i,DEFAULT_ELEMENT_REFS:o,OVERLAY_TYPES:a,OPEN_STATES:s,INITIAL_STATE:r,EVENTS:l,CLASSES:d,ACTIONS_TYPES:c,CUSTOM_STYLE_TYPES:u,CSS_CONSTANTS:h,SELECTORS:p};const m=g},91289:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var i=n(40477);var o=n(41453);var a=n(97418);var s=n(12405);var r=n(51949);var l=n(5015);var d=n(97854);function c(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}class u extends a["default"]{constructor(e,t,n){super();c(this,"state",void 0);c(this,"id",void 0);c(this,"options",void 0);c(this,"elements",void 0);c(this,"_animationTimeout",void 0);c(this,"_bodyScrollManager",void 0);c(this,"_overlayFocusTrap",void 0);c(this,"triggerPlaceholder",void 0);c(this,"getInitialState",(()=>r["default"].INITIAL_STATE));c(this,"initialize",(()=>{var e;this.elements.root instanceof HTMLElement&&(null===(e=this.elements.root)||void 0===e?void 0:e.classList.remove(r["default"].CLASSES.DISPLAY_NONE));this._bodyScrollManager=new i["default"];this._setupFocusTrap()}));c(this,"getGlobalModalContainer",(e=>{const t=(0,d.createPortalDestination)("screen-covers",e);return t}));c(this,"open",(()=>{var e;if(this._animationTimeout&&this.state.openState===r["default"].OPEN_STATES.IS_OPENING)return this._animationTimeout.getPromise();if(this.state.openState===r["default"].OPEN_STATES.IS_OPEN)return Promise.resolve();this._animationTimeout&&this._animationTimeout.cancel();this.elements.root&&this.elements.root.classList.add(r["default"].CLASSES.WILL_ANIMATE);null===(e=this._bodyScrollManager)||void 0===e?void 0:e.containScrolling(this.elements.root);this.setState({openState:r["default"].OPEN_STATES.IS_OPENING});"grow"===this.options.animationStyle?this._animationTimeout=this._applyGrowStyles("open"):this._animationTimeout=new s["default"](this.options.animateIn?r["default"].CSS_CONSTANTS.OPEN_ANIMATION_TIMEOUT:0);if(this._animationTimeout){var t;return null===(t=this._animationTimeout)||void 0===t?void 0:t.then((()=>{this._openCompleted()}))}this._openCompleted();return}));c(this,"cancel",(()=>{if(this._animationTimeout&&this.state.openState===r["default"].OPEN_STATES.IS_CLOSING)return this._animationTimeout.getPromise();if(this.state.openState===r["default"].OPEN_STATES.IS_CLOSED)return Promise.resolve();this.setState({openState:r["default"].OPEN_STATES.IS_CANCELED});return}));c(this,"close",(()=>{if(this._animationTimeout&&this.state.openState===r["default"].OPEN_STATES.IS_CLOSING)return this._animationTimeout.getPromise();if(this.state.openState===r["default"].OPEN_STATES.IS_CLOSED)return Promise.resolve();this._animationTimeout&&this._animationTimeout.cancel();this.setState({openState:r["default"].OPEN_STATES.IS_CLOSING});this._releaseFocusTrap(true);"grow"===this.options.animationStyle?this._animationTimeout=this._applyGrowStyles("close"):this._animationTimeout=new s["default"](this.options.animateOut?r["default"].CSS_CONSTANTS.CLOSE_ANIMATION_TIMEOUT:0);if(this._animationTimeout)return this._animationTimeout.then((()=>{this._closeCompleted()}));this._closeCompleted();return}));c(this,"teardown",(()=>{this._animationTimeout&&this._animationTimeout.cancel();this._releaseScrollingLock();this._releaseFocusTrap(true);this._globalAriaHide()}));c(this,"_openCompleted",(()=>{var e;this._animationTimeout=null;this._globalAriaShow();null===(e=this._overlayFocusTrap)||void 0===e?void 0:e.activate();this.setState({openState:r["default"].OPEN_STATES.IS_OPEN})}));c(this,"_closeCompleted",(()=>{this._animationTimeout=null;this.elements.root&&this.elements.root.classList.remove(r["default"].CLASSES.WILL_ANIMATE);this._releaseScrollingLock();this._globalAriaHide();this.setState({openState:r["default"].OPEN_STATES.IS_CLOSED})}));c(this,"_releaseScrollingLock",(()=>{var e;null===(e=this._bodyScrollManager)||void 0===e?void 0:e.releaseScrolling()}));c(this,"_releaseFocusTrap",(e=>{if(e){var t;null===(t=this._overlayFocusTrap)||void 0===t?void 0:t.deactivate({onDeactivate:()=>{}})}else{var n;null===(n=this._overlayFocusTrap)||void 0===n?void 0:n.deactivate()}}));c(this,"_applyGrowStyles",(e=>{const t=this._getTriggerElement();if(!(0,l["default"])(t,"WtOverlay - To use grow animation (`animationStyle='grow'`), the overlay must have a trigger element with an`aria-controls` attribute matching the overlay id"))return new s["default"](0);if(this.elements.modal&&t){const n=t.getBoundingClientRect();this.elements.modal.style.transition="none";this.elements.modal.style.transform="none";const i=this.elements.modal.getBoundingClientRect();this.elements.modal.style.transition="";this.elements.modal.style.transform="";if(!this.triggerPlaceholder){this.triggerPlaceholder=document.createElement("div");document.body.appendChild(this.triggerPlaceholder)}this.triggerPlaceholder.classList.add("wt-overlay__animation-placeholder");const o={left:"left",top:"top",width:"width",height:"height"};const a=["left","top","width","height"];a.forEach((e=>{this.triggerPlaceholder&&n&&(this.triggerPlaceholder.style[e]=`${n[e]}px`)}));const l=2;const d={x:i.left+.5*l-n.left,y:i.top+.5*l-n.top,width:(i.width-l)/n.width,height:(i.height-l)/n.height};const c=`translate3d(${d.x}px, ${d.y}px, 0px) scale(${d.width}, ${d.height})`;const u=e=>{requestAnimationFrame((()=>{requestAnimationFrame(e)}))};if("open"===e)u((()=>{if(this.triggerPlaceholder){this.triggerPlaceholder.classList.add("wt-overlay__animation-placeholder--open");this.triggerPlaceholder.style.transform=c}}));else{this.triggerPlaceholder.classList.add("wt-overlay__animation-placeholder--open");this.triggerPlaceholder.style.transform=c;u((()=>{if(this.triggerPlaceholder){this.triggerPlaceholder.classList.remove("wt-overlay__animation-placeholder--open");this.triggerPlaceholder.style.transform="translate3d(0, 0, 0) scale(1)"}}))}const h=1e3/60*2;const p=new s["default"](r["default"].CSS_CONSTANTS.GROW_ANIMATION_TIMEOUT+h);p.then((()=>{setTimeout((()=>{this.triggerPlaceholder&&this.triggerPlaceholder.parentElement&&this.triggerPlaceholder.parentElement.removeChild(this.triggerPlaceholder);this.triggerPlaceholder=null}),50)}));return p}return null}));c(this,"_getTriggerElement",(()=>{var e;const t=null===(e=this.elements.root)||void 0===e?void 0:e.id;const n=document.querySelector(`[aria-controls='${t}']`);return n}));c(this,"_setupFocusTrap",(()=>{this.elements.modal instanceof HTMLElement&&(this._overlayFocusTrap=(0,o["default"])(this.elements.modal,{...this.options,initialFocusSelector:r["default"].SELECTORS.INITIAL_FOCUS_ELEMENT,maskSelector:`#${this.options.modalContainerId}`},this.cancel))}));c(this,"_globalAriaShow",(()=>{if(this.elements.globalModalContainer&&this.elements.globalPageContent)for(let e=0;e{if(this.elements.globalModalContainer&&this.elements.globalPageContent)for(let e=0;er["default"].INITIAL_STATE));c(u,"getGlobalModalContainer",(e=>{const t=(0,d.createPortalDestination)("screen-covers",e);return t}));const h=u},12405:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}class o{constructor(e){i(this,"timeout",null);i(this,"promise",void 0);this.promise=0===e?Promise.resolve():new Promise((t=>{this.timeout=setTimeout(t,e)}))}getPromise(){return this.promise}cancel(){this.timeout&&clearTimeout(this.timeout)}then(e){return this.promise.then(e)}}},41453:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var i=n(50947);var o=n(36448);const a="alertdialog";const s="click";const r="[data-initial-focus]";const l=false;function d(e,t=r){const n=e.querySelector(t);const i=n||void 0;let a;i&&(a=()=>{i&&!(0,o.isFocusable)(i)&&i.setAttribute("tabindex","-1");return i});return a}function c(e,t,n){const{ariaRole:r,closeOnEsc:c,closeOnMaskClick:u,initialFocusSelector:h,maskSelector:p}=t;const g=d(e,h);const m=()=>{e.setAttribute("tabindex","-1");return e};const v=r!==a&&u;let f=null;let _=null;const y=e=>{let t=null;e.target instanceof Element&&(t=e.target);if(!v)return true;if(e.type!==s){_=t;return true}if(null===_||_!==t){_=null;return true}if(p&&null===t.closest(p)){_=null;return true}_=null;f&&t&&f({returnFocus:!(0,o.isFocusable)(t)});return false};const S=(0,i.createFocusTrap)(e,{escapeDeactivates:c,onDeactivate:n,initialFocus:g,fallbackFocus:m,clickOutsideDeactivates:l,allowOutsideClick:y,preventScroll:true});f=null===S||void 0===S?void 0:S.deactivate;return S}},97418:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n;return e}class o{constructor(){i(this,"state",void 0);i(this,"elements",void 0);i(this,"listeners",void 0);this.elements={};this.listeners=[]}getState(){return this.state}setState(e,t){if("object"===typeof e)for(const n in e)void 0!==e[n]&&(this.state[n]=e[n]);else e in this.state&&void 0!==t&&(this.state[e]=t);this.notifyListeners()}addListener(e){this.listeners=this.listeners||[];this.listeners.push(e)}notifyListeners(){const e=this.getState();this.listeners=this.listeners||[];this.listeners.forEach((t=>{t(e)}))}setElements(e){this.elements={...this.elements,...e}}}const a=o},95989:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});function i(e){const t={...e.dataset};for(const n in t){const e=t[n];if("true"!==e&&"false"!==e)continue;t[n]="true"===e}return t}},32648:(e,t,n)=>{"use strict";var i=n(88057);var o=n(78537);var a=n(79365);const s="--vh";const r="mobileViewportHeight";let l=null;const d=function(){if("undefined"!==typeof window){const e=.01*window.innerHeight;document.documentElement.style.setProperty(s,`${e}px`)}};(0,i.onDOMReady)((()=>{if("undefined"===typeof window||!o["default"].hasSupport("cssVariables")||r in document.body.dataset)return;d();window.addEventListener("resize",(()=>{l&&window.cancelAnimationFrame(l);l=window.requestAnimationFrame(d)}),a["default"]);document.body.dataset[r]="true"}))},79365:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var i=n(78537);const o=i["default"].hasSupport("passiveEventListeners")?{passive:true}:{capture:false}},97854:(e,t,n)=>{"use strict";n.d(t,{createPortalDestination:()=>l});const i="wt-portals";const o=["wt-portal-blue","wt-portal-green","wt-portal-yellow","wt-portal-orange","wt-portal-red-orange","wt-portal-red"];const a={"viewport-fixed":"wt-portal-blue","screen-covers":"wt-portal-green","alert-toasts":"wt-portal-yellow","anchored-panels":"wt-portal-orange","anchored-panels-with-triggers":"wt-portal-red-orange",tooltips:"wt-portal-red"};const s={"wt-portal-blue":"default","wt-portal-green":"default","wt-portal-yellow":"default","wt-portal-orange":"default","wt-portal-red-orange":"top","wt-portal-red":"default"};function r(){var e;return"undefined"!==typeof document&&!!(null!==(e=document)&&void 0!==e&&e.getElementById)}function l(e,t){if(r()){let n;t&&(n=document.getElementById(t));if(n)return n;let r=document.getElementById(i);if(!r){const e=document.createElement("div");e.setAttribute("id",i);document.body.appendChild(e);r=e}o.forEach((e=>{const t=document.getElementById(e);if(!t){var n;const t=document.createElement("div");t.setAttribute("id",e);t.style.zIndex="80";if("top"===s[e]){t.style.position="absolute";t.style.top="0";t.style.left="0";t.style.width="100%";t.style.height="0"}else t.style.position="relative";null===(n=r)||void 0===n?void 0:n.appendChild(t)}}));const l=a[e];const d=document.getElementById(l);if(t){n=document.createElement("div");n.setAttribute("id",t);null===d||void 0===d?void 0:d.appendChild(n);return n}return d}return null}},5015:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var i=n(42486);function o(e,t){if(e)return true;const n=new Error(t);false;i["default"].captureException(n);return false}},42486:(e,t,n)=>{e.exports=n(32181)(1089)},78537:(e,t,n)=>{e.exports=n(32181)(2137)},36529:(e,t,n)=>{e.exports=n(32181)(2238)},67507:(e,t,n)=>{e.exports=n(11987)(2641)},53579:(e,t,n)=>{e.exports=n(32181)(3042)},6831:(e,t,n)=>{e.exports=n(32181)(3693)},53423:(e,t,n)=>{e.exports=n(32181)(3936)},62879:(e,t,n)=>{e.exports=n(32181)(4476)},50947:(e,t,n)=>{e.exports=n(11987)(49)},2073:(e,t,n)=>{e.exports=n(32181)(5257)},20029:(e,t,n)=>{e.exports=n(32181)(5666)},55110:(e,t,n)=>{e.exports=n(32181)(6220)},32444:(e,t,n)=>{e.exports=n(32181)(6873)},14935:(e,t,n)=>{e.exports=n(32181)(696)},66848:(e,t,n)=>{e.exports=n(32181)(7881)},36448:(e,t,n)=>{e.exports=n(11987)(8118)},42695:(e,t,n)=>{e.exports=n(32181)(8313)},22790:(e,t,n)=>{e.exports=n(32181)(9290)},17119:(e,t,n)=>{e.exports=n(32181)(9633)},88057:(e,t,n)=>{e.exports=n(32181)(9965)},32181:e=>{"use strict";e.exports=etsy_libs_30bc4a394fcd9a30315a},11987:e=>{"use strict";e.exports=vendor_bundle_4b28aa70c9cca35746a4}};var t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var a=t[i]={exports:{}};e[i](a,a.exports,n);return a.exports}n.m=e;(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;n.d(t,{a:t});return t}})();(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:true,get:t[i]})}})();(()=>{n.f={};n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>{n.f[i](e,t);return t}),[]))})();(()=>{n.u=e=>"async/common-entrypoints/"+"auto/app-shell/footer/deferred"+"."+"03ab5d932bb2c24953fa"+".js"})();(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})();(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{var e={};n.l=(t,i,o,a)=>{if(e[t]){e[t].push(i);return}var s,r;if(void 0!==o){var l=document.getElementsByTagName("script");for(var d=0;d{s.onerror=s.onload=null;clearTimeout(h);var o=e[t];delete e[t];s.parentNode&&s.parentNode.removeChild(s);o&&o.forEach((e=>e(i)));if(n)return n(i)};var h=setTimeout(u.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=u.bind(null,s.onerror);s.onload=u.bind(null,s.onload);r&&document.head.appendChild(s)}})();(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t){t.currentScript&&(e=t.currentScript.src);if(!e){var i=t.getElementsByTagName("script");if(i.length){var o=i.length-1;while(o>-1&&(!e||!/^http(s?):/.test(e)))e=i[o--].src}}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");n.p=e+"../../"})();(()=>{var e={1728:0,584:0,1309:0};n.f.j=(t,i)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else if(true){var a=new Promise(((n,i)=>o=e[t]=[n,i]));i.push(o[2]=a);var s=n.p+n.u(t);var r=new Error;var l=i=>{if(n.o(e,t)){o=e[t];0!==o&&(e[t]=void 0);if(o){var a=i&&("load"===i.type?"missing":i.type);var s=i&&i.target&&i.target.src;r.message="Loading chunk "+t+" failed.\n("+a+": "+s+")";r.name="ChunkLoadError";r.type=a;r.request=s;o[1](r)}}};n.l(s,l,"chunk-"+t,t)}};var t=(t,i)=>{var[o,a,s]=i;var r,l,d=0;if(o.some((t=>0!==e[t]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(s)var c=s(n)}t&&t(i);for(;d{"use strict";var e=n(52381);var t=n(6268);var i=n(32444);var o=n(17119);var a=n(36529);var s=n(6831);var r=n(55110);var l=n(6255);var d;function c(e){return new Promise((t=>{if(document.querySelector(e))return t(document.querySelector(e));const n=new MutationObserver((()=>{if(document.querySelector(e)){n.disconnect();t(document.querySelector(e))}}));n.observe(document.body,{childList:true,subtree:true})}))}function u(e=true){if(r["default"].getBoolean("dynamic_privacy_settings_ui_enabled")){try{window.initializePrivacySettingsManager(true,e);s["default"].increment("privacy.transcend.privacy_settings_manager_loaded_initially")}catch(t){s["default"].increment("privacy.transcend.privacy_settings_manager_failed_initially",1);c("#privacy-settings-manager-load-complete").then((()=>{window.initializePrivacySettingsManager(true,e);s["default"].increment("privacy.transcend.privacy_settings_manager_loaded_after_waiting",1)}))}s["default"].increment("privacy.transcend.dynamic_settings_ui_enabled")}}async function h(){await window.airgap.sync();const n=o["default"].getSignedInUserId();if(r["default"].getBoolean("dual_write_enabled"))if(n){const t=(0,e["default"])(window.airgap.getConsent(),{is_confirmed:false,expiration_period_minutes:window.airgap.loadOptions.consentExpiry,applicable_purposes:Array.from(window.airgap.getRegimePurposes()),regional_experiences:Array.from(window.airgap.getRegimes())});(0,i["default"])(t).then((e=>{if(e.ok){s["default"].increment(`privacy.transcend.anonymous.save_preference.success`);u()}else{s["default"].increment(`privacy.transcend.anonymous.save_preference.failed`);u(false)}})).catch((()=>{u(false)}))}else{const e=(0,t["default"])(window.airgap.getConsent(),{is_confirmed:false,expiration_period_minutes:window.airgap.loadOptions.consentExpiry,applicable_purposes:Array.from(window.airgap.getRegimePurposes()),regional_experiences:Array.from(window.airgap.getRegimes())});(0,i["default"])(e).then((e=>{if(e.ok){s["default"].increment(`privacy.transcend.anonymous.save_preference.success`);u()}else{s["default"].increment(`privacy.transcend.anonymous.save_preference.failed`);u(false)}})).catch((()=>{u(false)}))}}if(!(null!==(d=self.airgap)&&void 0!==d&&d.ready)){var p;self.airgap={...null===(p=self)||void 0===p?void 0:p.airgap,readyQueue:[],ready(e){var t;null===(t=this.readyQueue)||void 0===t?void 0:t.push(e)}}}self.airgap.ready((()=>{const e=r["default"].getString("airgap_bundle");a["default"].logEvent({event_name:`transcend_cmp_airgap_loaded`,airgap_url:r["default"].getString("airgap_url"),airgap_bundle:e,regimes:window.airgap.getRegimes()});s["default"].increment(`privacy.transcend.airgap_bundle_loaded.${e}`);h();r["default"].getBoolean("dynamic_privacy_settings_ui_enabled")&&c("#footer-script-loaded").then((()=>{(0,l.updatePrivacySettingsFooterTextBasedOnRegime)()}))}))})()})(); //# sourceMappingURL=https://www.etsy.com/sourcemaps/evergreenVendor/en-GB/@etsy-modules/ConsentManagement/Transcend-Integration.65983beb85f82c0d3fef.js.map